﻿@model IEnumerable<CTM.Web.Models.View.Feedback.FeedbackViewModel>
@using CTM.Web.Utils
@{
    int index = 0;
}
@foreach (var feedback in Model)
{
    ++index;
    <tr>
        <td class="text-right">@index</td>
        <td style="white-space: nowrap;">@feedback.CreatedOn.ToString("d-MMM-yyyy")</td>
        @*<td>@feedback.Employee.DisplayName</td>*@
        <td>@feedback.Manager.DisplayName</td>
        <td>
            <a href="@Url.Action("Index", "Feedback", new { id = feedback.Employee.Id })#feedback-@feedback.Id">
                @feedback.Description
            </a>
        </td>
        <td>@Html.Raw(string.Join(", ", feedback.Tags.Select(t => t.Name)))</td>
        <td>
            @switch (feedback.Emoticon)
            {
                case CTM.Web.Utils.Emoticon.Smile:
                    <span class="label label-success"><span class="fa fa-lg fa-smile-o"></span></span>
                    break;
                case CTM.Web.Utils.Emoticon.Neutral:
                <span class="label label-warning"><span class="fa fa-lg fa-meh-o"></span></span>
                    break;
                case CTM.Web.Utils.Emoticon.Frown:
                <span class="label label-danger"><span class="fa fa-lg fa-frown-o"></span></span>
                    break;
            }
        </td>
    </tr>
}